def is_correct_brackets(text):
while '()' in text or '[]' in text or '{}' in text:
text = text.replace('()', '')
text = text.replace('[]', '')
text = text.replace('{}', '')
if len(text) == 0:
return'yes'
return 'no'
a = input()
print(is_correct_brackets(a))